package com.isoft.service.tableservice;

import com.isoft.dao.tabledao.DfmeHbttDao;
import com.isoft.entity.tableentity.dfme_hbtt.DfmeHbttMsg;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.Timestamp;

@Service
@Slf4j
public class DfmeHbttService {
    @Autowired
    DfmeHbttDao dfmeHbttDao;
    public int insertmsg(DfmeHbttMsg dfmeHbttMsg) throws Exception{
        Timestamp create_time = new Timestamp(System.currentTimeMillis());
        dfmeHbttDao.insertMeta(create_time,dfmeHbttMsg.getDfmeHbttMeta());
        return  dfmeHbttDao.insertDflt(dfmeHbttMsg.getDfmeHbttMeta().getSeqn(),create_time,dfmeHbttMsg.getDfmeHbttDflt());

    }

}
